<?php


// create a new taxonomy
function new_taxonomy() {
	register_taxonomy(
		'exhibition-category',
		array('exhibition'),
		array(
			'labels' => array(
				'name' => 'Category',
				'singluar_name' => 'Category'
			),
			'public' => true,
			'show_in_nav_menus' => true,
			'show_ui' => true,
			'show_tagcloud' => true,
			'hierarchical' => true,
			'rewrite' => array('slug' => 'exhibition-category', 'with_front' => true)
		)
	);
	
	register_taxonomy(
		'bookshop-category',
		array('bookshop'),
		array(
			'labels' => array(
				'name' => 'Category',
				'singluar_name' => 'Category'
			),
			'public' => true,
			'show_in_nav_menus' => true,
			'show_ui' => true,
			'show_tagcloud' => true,
			'hierarchical' => true,
			'rewrite' => array('slug' => 'bookshop-category', 'with_front' => true)
		)
	);

	register_taxonomy(
		'artothek-year',
		array('artothek'),
		array(
			'labels' => array(
				'name' => 'Year',
				'singluar_name' => 'Year'
			),
			'public' => true,
			'show_in_nav_menus' => true,
			'show_ui' => true,
			'show_tagcloud' => true,
			'hierarchical' => true,
			'rewrite' => array('slug' => 'artothek-year', 'with_front' => true)
		)
	);

	register_taxonomy(
		'editionen-category',
		array('editionen'),
		array(
			'labels' => array(
				'name' => 'Category',
				'singluar_name' => 'Category'
			),
			'public' => true,
			'show_in_nav_menus' => true,
			'show_ui' => true,
			'show_tagcloud' => true,
			'hierarchical' => true,
			'rewrite' => array('slug' => 'editionen-category', 'with_front' => true)
		)
	);


	register_taxonomy(
		'years',
		array('exhibition'),
		array(
			'labels' => array(
				'name' => 'Year',
				'singluar_name' => 'Year'
			),
			'public' => true,
			'show_in_nav_menus' => true,
			'show_ui' => true,
			'show_tagcloud' => true,
			'hierarchical' => true,
			'rewrite' => array('slug' => 'years', 'with_front' => true)
		)
	);

	register_taxonomy(
		'artothek-filter',
		array('artothek'),
		array(
			'labels' => array(
				'name' => 'Filter ',
				'singluar_name' => 'Filter '
			),
			'public' => true,
			'show_in_nav_menus' => true,
			'show_ui' => true,
			'show_tagcloud' => true,
			'hierarchical' => true,
			'rewrite' => array('slug' => 'artothek-filter', 'with_front' => true)
		)
	);
	

	register_taxonomy(
		'editionen-filter',
		array('editionen'),
		array(
			'labels' => array(
				'name' => 'Filter ',
				'singluar_name' => 'Filter '
			),
			'public' => true,
			'show_in_nav_menus' => true,
			'show_ui' => true,
			'show_tagcloud' => true,
			'hierarchical' => true,
			'rewrite' => array('slug' => 'editionen-filter', 'with_front' => true)
		)
	);

	register_taxonomy(
		'editionen-year',
		array('editionen'),
		array(
			'labels' => array(
				'name' => 'Year',
				'singluar_name' => 'Year'
			),
			'public' => true,
			'show_in_nav_menus' => true,
			'show_ui' => true,
			'show_tagcloud' => true,
			'hierarchical' => true,
			'rewrite' => array('slug' => 'editionen-year', 'with_front' => true)
		)
	);
}

add_action( 'init', 'new_taxonomy' );

// Unregister Taxonomy
/*
function unregister_taxonomy(){
	global $wp_taxonomies;

	$taxonomy_1 = 'category';
	if ( taxonomy_exists( $taxonomy_1))
		unset( $wp_taxonomies[$taxonomy_1]);
	$taxonomy_2 = 'post_tag';
	if ( taxonomy_exists( $taxonomy_2))
		unset( $wp_taxonomies[$taxonomy_2]);
		
}
add_action( 'init', 'unregister_taxonomy');
*/

